import request from '@/utils/request'
const api_name = '/manage/admin/teachers'

export function getPageList(page, limit ,searchParams) {
  return request({
    url: `${api_name}/${page}/${limit}`,
    method: 'get',
    params: searchParams
  })
}

export function deleteById(id) {
  return request({
    url: `${api_name}/${id}`,
    method: 'delete'
  })
}

export function updateStatusById(id, status) {
  return request({
    url: `${api_name}/${id}/${status}`,
    method: 'put',
  })
}

export function updateTeacherById(id, data) {
  return request({
    url: `${api_name}/${id}`,
    method: 'put',
    data
  })
}

export function getTeacherById(id) {
  return request({
    url: `${api_name}/${id}`,
    method: 'get'
  })
}

export function getTeacherDetailById(id) {
  return request({
    url: `${api_name}/detail/${id}`,
    method: 'get'
  })
}
